Optimal. Leaf size=230 \[ -\frac {16 a^2 (3 A+2 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^2 (7 A+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 a^2 (21 A+19 C) \sin (c+d x)}{105 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {4 a^2 (7 A+5 C) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {16 a^2 (3 A+2 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)}}+\frac {2 C (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {8 C \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d \cos ^{\frac {7}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 230, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.257, Rules used = {4199, 3123,
3054, 3047, 3100, 2827, 2716, 2720, 2719} \begin {gather*} \frac {4 a^2 (7 A+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}-\frac {16 a^2 (3 A+2 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^2 (7 A+5 C) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a^2 (21 A+19 C) \sin (c+d x)}{105 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {16 a^2 (3 A+2 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)}}+\frac {8 C \sin (c+d x) \left (a^2 \cos (c+d x)+a^2\right )}{63 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2 C \sin (c+d x) (a \cos (c+d x)+a)^2}{9 d \cos ^{\frac {9}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2716
Rule 2719
Rule 2720
Rule 2827
Rule 3047
Rule 3054
Rule 3100
Rule 3123
Rule 4199
Rubi steps
\begin {align*} \int \frac {(a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx &=\int \frac {(a+a \cos (c+d x))^2 \left (C+A \cos ^2(c+d x)\right )}{\cos ^{\frac {11}{2}}(c+d x)} \, dx\\ &=\frac {2 C (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {2 \int \frac {(a+a \cos (c+d x))^2 \left (2 a C+\frac {3}{2} a (3 A+C) \cos (c+d x)\right )}{\cos ^{\frac {9}{2}}(c+d x)} \, dx}{9 a}\\ &=\frac {2 C (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {8 C \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {4 \int \frac {(a+a \cos (c+d x)) \left (\frac {3}{4} a^2 (21 A+19 C)+\frac {3}{4} a^2 (21 A+11 C) \cos (c+d x)\right )}{\cos ^{\frac {7}{2}}(c+d x)} \, dx}{63 a}\\ &=\frac {2 C (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {8 C \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {4 \int \frac {\frac {3}{4} a^3 (21 A+19 C)+\left (\frac {3}{4} a^3 (21 A+11 C)+\frac {3}{4} a^3 (21 A+19 C)\right ) \cos (c+d x)+\frac {3}{4} a^3 (21 A+11 C) \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x)} \, dx}{63 a}\\ &=\frac {2 a^2 (21 A+19 C) \sin (c+d x)}{105 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 C (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {8 C \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {8 \int \frac {\frac {45}{4} a^3 (7 A+5 C)+21 a^3 (3 A+2 C) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx}{315 a}\\ &=\frac {2 a^2 (21 A+19 C) \sin (c+d x)}{105 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 C (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {8 C \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {1}{15} \left (8 a^2 (3 A+2 C)\right ) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx+\frac {1}{7} \left (2 a^2 (7 A+5 C)\right ) \int \frac {1}{\cos ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 (21 A+19 C) \sin (c+d x)}{105 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {4 a^2 (7 A+5 C) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {16 a^2 (3 A+2 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)}}+\frac {2 C (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {8 C \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d \cos ^{\frac {7}{2}}(c+d x)}-\frac {1}{15} \left (8 a^2 (3 A+2 C)\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{21} \left (2 a^2 (7 A+5 C)\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=-\frac {16 a^2 (3 A+2 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^2 (7 A+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 a^2 (21 A+19 C) \sin (c+d x)}{105 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {4 a^2 (7 A+5 C) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {16 a^2 (3 A+2 C) \sin (c+d x)}{15 d \sqrt {\cos (c+d x)}}+\frac {2 C (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d \cos ^{\frac {9}{2}}(c+d x)}+\frac {8 C \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d \cos ^{\frac {7}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 6.79, size = 1137, normalized size = 4.94 \begin {gather*} \frac {\cos ^{\frac {9}{2}}(c+d x) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {8 (3 A+2 C) \csc (c) \sec (c)}{15 d}+\frac {C \sec (c) \sec ^5(c+d x) \sin (d x)}{9 d}+\frac {\sec (c) \sec ^4(c+d x) (7 C \sin (c)+18 C \sin (d x))}{63 d}+\frac {2 \sec (c) \sec (c+d x) (35 A \sin (c)+25 C \sin (c)+84 A \sin (d x)+56 C \sin (d x))}{105 d}+\frac {\sec (c) \sec ^3(c+d x) (90 C \sin (c)+63 A \sin (d x)+112 C \sin (d x))}{315 d}+\frac {\sec (c) \sec ^2(c+d x) (63 A \sin (c)+112 C \sin (c)+210 A \sin (d x)+150 C \sin (d x))}{315 d}\right )}{A+2 C+A \cos (2 c+2 d x)}-\frac {2 A \cos ^4(c+d x) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{3 d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)}}-\frac {10 C \cos ^4(c+d x) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{21 d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)}}+\frac {4 A \cos ^4(c+d x) \csc (c) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\text {ArcTan}(\tan (c)))\right ) \sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {1+\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{5 d (A+2 C+A \cos (2 c+2 d x))}+\frac {8 C \cos ^4(c+d x) \csc (c) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\text {ArcTan}(\tan (c)))\right ) \sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {1+\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{15 d (A+2 C+A \cos (2 c+2 d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1140\) vs.
\(2(258)=516\).
time = 0.33, size = 1141, normalized size = 4.96
method | result | size |
default | \(\text {Expression too large to display}\) | \(1141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.33, size = 279, normalized size = 1.21 \begin {gather*} -\frac {2 \, {\left (15 i \, \sqrt {2} {\left (7 \, A + 5 \, C\right )} a^{2} \cos \left (d x + c\right )^{5} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 15 i \, \sqrt {2} {\left (7 \, A + 5 \, C\right )} a^{2} \cos \left (d x + c\right )^{5} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 84 i \, \sqrt {2} {\left (3 \, A + 2 \, C\right )} a^{2} \cos \left (d x + c\right )^{5} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 84 i \, \sqrt {2} {\left (3 \, A + 2 \, C\right )} a^{2} \cos \left (d x + c\right )^{5} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - {\left (168 \, {\left (3 \, A + 2 \, C\right )} a^{2} \cos \left (d x + c\right )^{4} + 30 \, {\left (7 \, A + 5 \, C\right )} a^{2} \cos \left (d x + c\right )^{3} + 7 \, {\left (9 \, A + 16 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} + 90 \, C a^{2} \cos \left (d x + c\right ) + 35 \, C a^{2}\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )\right )}}{315 \, d \cos \left (d x + c\right )^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{2} \left (\int \frac {A}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {2 A \sec {\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {A \sec ^{2}{\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {C \sec ^{2}{\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {2 C \sec ^{3}{\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {C \sec ^{4}{\left (c + d x \right )}}{\cos ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.76, size = 482, normalized size = 2.10 \begin {gather*} \frac {4\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )\,\left (\frac {7\,A\,a^2\,\sin \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {4\,C\,a^2\,\sin \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {3\,C\,a^2\,\sin \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{7/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}\right )}{21\,d}-\frac {8\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {7}{4};\ {\cos \left (c+d\,x\right )}^2\right )\,\left (\frac {9\,A\,a^2\,\sin \left (c+d\,x\right )}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {16\,C\,a^2\,\sin \left (c+d\,x\right )}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {5\,C\,a^2\,\sin \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}\right )}{135\,d}+\frac {2\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )\,\left (\frac {81\,A\,a^2\,\sin \left (c+d\,x\right )}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {9\,A\,a^2\,\sin \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {64\,C\,a^2\,\sin \left (c+d\,x\right )}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {21\,C\,a^2\,\sin \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {5\,C\,a^2\,\sin \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{9/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}\right )}{45\,d}+\frac {16\,C\,a^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {5}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{21\,d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________